package com.asiainfo.ncrm.base;

import java.util.HashMap;
import java.util.Map;

import com.asiainfo.ncrm.util.AntConstant;
import com.asiainfo.ncrm.util.SharedUtil;


public class Params {
	static Map<String, Object> params;

	/**
	 * 获取短信验证码
	 * 
	 * @param mobile
	 * @return
	 */
	public static Map<String, Object> getSmsCode(String mobile) {
		params = new HashMap<String, Object>();
		params.put("mobile", mobile);
		return params;
	}

	/**
	 * 验证码登录
	 * 
	 * @param mobile
	 * @param smsCode
	 * @return
	 */
	public static Map<String, Object> getLogin(String mobile, String smsCode) {
		params = new HashMap<String, Object>();
		params.put("msgId", SharedUtil.getString(AntConstant.SP_MSG_ID, ""));
		params.put("mobile", mobile);
		params.put("smsCode", smsCode);
		params.put("areaId", 0 + "");
		return params;

	}

	/**
	 * 获取商家列表
	 * 
	 * @param shopId
	 * @param shopName
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	public static Map<String, Object> getShopList(String shopId, String shopName, String pageNo, String pageSize) {
		params = new HashMap<String, Object>();
		params.put("shopId", shopId);
		params.put("shopName", shopName);
		params.put("pageNo", pageNo);
		params.put("pageSize", pageSize);
		return params;
	}

	/**
	 * 添加商户
	 * 
	 * @param shopName
	 * @param shopPhone
	 * @param shopAddress
	 * @param shopImgUrl
	 * @return
	 */
	public static Map<String, Object> insertShop(String shopName, String shopPhone, String shopAddress,
			String shopImgUrl) {
		params = new HashMap<String, Object>();
		params.put("shopName", shopName);
		params.put("shopPhone", shopPhone);
		params.put("shopAddress", shopAddress);
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		params.put("imgShop", shopImgUrl);
		params.put("areaId", SharedUtil.getString(AntConstant.SP_CHOOSE_AREA_ID, "1"));
		params.put("shopAddressX", SharedUtil.getString(AntConstant.SP_LOCATION_LATITUDE, "null"));
		params.put("shopAddressY", SharedUtil.getString(AntConstant.SP_LOCATION_LONGITUDE, "null"));
		return params;
	}

	/**
	 * 意见反馈
	 * 
	 * @param content
	 * @return
	 */
	public static Map<String, Object> addSuggestion(String content) {
		params = new HashMap<String, Object>();
		params.put("content", content);
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		return params;
	}

	public static Map<String, Object> queryAccoutDetails(int dealtype) {
		params = new HashMap<String, Object>();
		if (dealtype == 1) {
			int[] type = { 3 };
			params.put("dealtype", type);
		}
		if (dealtype == 2) {
			int[] type = { 1, 2 };
			params.put("dealtype", type);
		}
//		int[] status = { 2 };
		int[] status = { 1,2 };
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		params.put("status", status);
		return params;
	}

	public static Map<String, Object> queryCashLogsById() {
		params = new HashMap<String, Object>();
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		params.put("pageNo", "1");
		params.put("pageSize", "30");
		return params;
	}

	/**
	 * 获取历史地址
	 * 
	 * @return
	 */
	public static Map<String, Object> getHistoryAddrs() {
		params = new HashMap<String, Object>();
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		params.put("type", "");
		params.put("name", "");
		return params;
	}

	/***
	 * 获取发单列表
	 * 
	 * @param partyId
	 * @param orderId
	 * @param orderNbr
	 * @param orderStatus
	 * @param payStatus
	 * @return
	 */
	public static Map<String, Object> getOrderList(String partyId, String orderStatus, String areaId, boolean isMy) {
		params = new HashMap<String, Object>();
		// params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE,
		// ""));
		params.put("partyId", partyId);
		params.put("orderId", "");
		params.put("orderNbr", "");
		params.put("orderStatus", orderStatus);
		params.put("payStatus", "");
		// params.put("areaId",
		// SharedUtil.getString(AntConstant.SP_CHOOSE_AREA_ID, "1"));
		params.put("areaId", areaId);
		if (isMy) {
			// params.put("filterSelf", "");
		} else {
			params.put("filterSelf", "1");
		}

		return params;
	}

	/***
	 * 订单确认
	 * 
	 * @param feeType
	 * @param feeForAccount
	 * @param orderNbr
	 * @return
	 */
	public static Map<String, Object> commitCasherByAccount(String feeType, String feeForAccount, String orderNbr) {
		params = new HashMap<String, Object>();
		params.put("feeType", feeType);
		params.put("accountId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		params.put("feeForAccount", feeForAccount);
		params.put("orderNbr", orderNbr);
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		return params;
	}

	public static Map<String, Object> rushOrderByPartyId(String orderId, String orderNbr) {
		params = new HashMap<String, Object>();
		params.put("orderId", orderId);
		params.put("orderNbr", orderNbr);
		params.put("senderPartyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		return params;
	}

	public static Map<String, Object> realName(String idCard, String partyName, String imgdataByParty,
			String imgdataByCard) {
		params = new HashMap<String, Object>();
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		params.put("idCard", idCard);
		params.put("partyName", partyName);
		params.put("imgdataByParty", imgdataByParty);
		params.put("imgdataByCard", imgdataByCard);
		return params;
	}

	public static Map<String, Object> updateShopByShopId(String idImg, String shopName, String msgTitle,
			String msgContent, String shopPhone,String shopAddress) {
		params = new HashMap<String, Object>();
		params.put("shopId", SharedUtil.getString(AntConstant.SP_SHOPID, ""));
		params.put("idImg", idImg);
		params.put("shopName", shopName);
		params.put("msgTitle", msgTitle);
		params.put("msgContent", msgContent);
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		params.put("shopPhone", shopPhone);
		params.put("shopAddress", shopAddress);
		return params;
	}

	public static Map<String, Object> bindCard(String cardNumber, String bankName, String bankType) {
		params = new HashMap<String, Object>();
		params.put("mobile", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		params.put("cardNumber", cardNumber);
		params.put("bankName", bankName);
		params.put("bankType", bankType);
		params.put("cardType", "2");
		return params;
	}

	public static Map<String, Object> cashLogsAdd(String type, String fee) {
		params = new HashMap<String, Object>();
		params.put("type", type);
		params.put("fee", fee);
		params.put("areaId", SharedUtil.getString(AntConstant.SP_CHOOSE_AREA_ID, "1"));
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		return params;
	}

	/**
	 * 发单人修改订单状态
	 * 
	 * @param orderNbr
	 * @param orderStatus
	 * @return
	 */
	public static Map<String, Object> updateOrderByCust(String orderNbr, String orderStatus) {
		params = new HashMap<String, Object>();
		params.put("orderStatus", orderStatus);
		params.put("orderNbr", orderNbr);
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		return params;
	}
	/**
	 * 发单人取消订单
	 * @param orderNbr
	 * @param orderStatus
	 * @return
	 */
	public static Map<String, Object> cancelOrderBySender(String orderId, String orderNbr) {
		params = new HashMap<String, Object>();
		params.put("orderId", orderId);
		params.put("orderNbr", orderNbr);
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		return params;
	}

	/**
	 * 获取账户金额
	 * 
	 * @param orderNbr
	 * @param orderStatus
	 * @return
	 */
	public static Map<String, Object> queryPartyInfos() {
		params = new HashMap<String, Object>();
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		params.put("pageNo", "1");
		params.put("pageSize", "1");
		return params;
	}

	/**
	 * 已接单
	 * 
	 * @return
	 */
	public static Map<String, Object> getOrderListByRush(String orderStatus) {
		params = new HashMap<String, Object>();
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		params.put("orderId", "");
		params.put("orderNbr", "");
		params.put("orderStatus", orderStatus);
		return params;
	}

	/**
	 * 接单人修改订单状态
	 * 
	 * @param orderNbr
	 * @param orderStatus
	 * @return
	 */
	public static Map<String, Object> updateOrderByDeliver(String orderId, String orderNbr, String orderStatus) {
		params = new HashMap<String, Object>();
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		params.put("orderId", orderId);
		params.put("orderNbr", orderNbr);
		params.put("orderStatus", orderStatus);
		return params;
	}

	/**
	 * 充值
	 * 
	 * @param fee
	 * @param orderType
	 * @return
	 */
	public static Map<String, Object> chargeMoney(String fee, String orderType) {
		params = new HashMap<String, Object>();
		params.put("partyId", SharedUtil.getString(AntConstant.SP_MOBILE, ""));
		params.put("fee", fee);
//		params.put("orderType", orderType);
		params.put("orderTypeCd", orderType);
		return params;
	}
}
